# Maintainer: Dekedro <dekedro@tankers.xyz>
pkgname=noise-suppression-for-voice
pkgver=0.91
pkgrel=1
pkgdesc="Real-time noise suppression plugin for voice"
url="https://github.com/werman/noise-suppression-for-voice"
arch="all"
license="GPL-3.0-or-later"
makedepends="cmake"
options="!check" # No tests
source="$pkgname-$pkgver.tar.gz::https://github.com/werman/noise-suppression-for-voice/archive/refs/tags/v$pkgver.tar.gz
	fix-lv2-dirs.patch::https://github.com/werman/noise-suppression-for-voice/commit/e391a9b7e04505a628b455c9d194a3c7006e4ae9.patch"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DBUILD_VST_PLUGIN=OFF \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e117fd54e6cf01c4721b79fddca2f2898331e46764c7a05077ed3034c50e2cbc0c1d6fa3084f7c6f56a629bf20127a7d1bccd57d30b0693cc3eb30edaae6cd28  noise-suppression-for-voice-0.91.tar.gz
8eb7a69e3069b9060d0e60e751463292c92bd943f687c0e326689d0bc36d2817bcb8733e84adb00661a962a337aeb99a4c709753f112f03b69a84b1a416faa26  fix-lv2-dirs.patch
"
